package com.ddyx.rest;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.ConsultationService;
import com.ddyx.service.IGoodsService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

@Controller
@RequestMapping("/consultation")
public class ConsultationController {

	
	@Resource
	ConsultationService consultationService;
	/**
	 * @Title: addConsultation   
	 * @Description: 新增咨询
	 * @param: @param param
	 * @param: @return      
	 * @return: ResponseForm      
	 * @throws
	 */
	@ResponseBody
	@RequestMapping(value="addConsultation",method=RequestMethod.POST)
	public ResponseForm addConsultation(@RequestBody RequestForm param) {
		return consultationService.addConsultation(param);
	}
	
	
	/**
	 * @Title: listConsultation   
	 * @Description: 咨询列表
	 * @param: @param param
	 * @param: @return      
	 * @return: ResponseForm      
	 * @throws
	 */
	@ResponseBody
	@RequestMapping(value="listConsultation",method=RequestMethod.POST)
	public ResponseForm listConsultation(@RequestBody RequestForm param) {
		return consultationService.listConsultation(param);
	}
	
	/**
	 * @Title: listConsultation   
	 * @Description: 咨询列表
	 * @param: @param param
	 * @param: @return      
	 * @return: ResponseForm      
	 * @throws
	 */
	@ResponseBody
	@RequestMapping(value="updateConsultation",method=RequestMethod.POST)
	public ResponseForm listCupdateConsultationonsultation(@RequestBody RequestForm param) {
		return consultationService.updateConsultation(param);
	}
}
